package com.yungu.swift.assets.driver.model.vo;

import java.util.Optional;

/**
 * @author Zerrion
 * @version 1.0
 * @description 用于接受车辆导出信息 转字段
 * @date 2017/10/20 11:38
 */
public class CarExportVo extends CarImportVo {

    /**
     * 车牌颜色
     **/
    private String plateColor;
    /**
     * 车辆燃料类型
     **/
    private String fuelType;
    /**
     * 服务类型
     **/
    private String commercialType;
    /**
     * 车辆检修状态
     **/
    private String fixState;
    /**
     * 车辆年度审验状态
     **/
    private String checkState;

    @Override
    public String getCheckState() {
        switch (Optional.ofNullable(checkState).orElse("")) {
            case "0":
                return "未年审";
            case "1":
                return "年审合格";
            case "2":
                return "年审不合格";
            default:
                return checkState;
        }
    }

    @Override
    public void setCheckState(String checkState) {
        this.checkState = checkState;
    }

    @Override
    public String getFixState() {
        switch (Optional.ofNullable(fixState).orElse("")) {
            case "0":
                return "未检修";
            case "1":
                return "已检修";
            case "2":
                return "未知";
            default:
                return fixState;
        }
    }

    @Override
    public void setFixState(String fixState) {
        this.fixState = fixState;
    }

    @Override
    public String getCommercialType() {
        switch (Optional.ofNullable(commercialType).orElse("")) {
            case "1":
                return "网络预约出租车";
            case "2":
                return "巡游出租车";
            case "3":
                return "私人小客车合乘";
            default:
                return commercialType;
        }
    }

    @Override
    public void setCommercialType(String commercialType) {
        this.commercialType = commercialType;
    }

    @Override
    public String getFuelType() {
        switch (Optional.ofNullable(fuelType).orElse("")) {
            case "A":
                return "汽油";
            case "B":
                return "柴油";
            case "C":
                return "电";
            case "D":
                return "混合油";
            case "E":
                return "天然气";
            case "F":
                return "液化石油气";
            case "L":
                return "甲醇";
            case "M":
                return "乙醇";
            case "N":
                return "太阳能";
            case "O":
                return "混合动力";
            case "Y":
                return "无";
            case "Z":
                return "其他";
            default:
                return fuelType;
        }
    }

    @Override
    public void setFuelType(String fuelType) {
        this.fuelType = fuelType;
    }

    @Override
    public String getPlateColor() {
        switch (Optional.ofNullable(plateColor).orElse("")) {
            case "1":
                return "蓝";
            case "2":
                return "黄";
            case "3":
                return "黑";
            case "4":
                return "白";
            case "9":
                return "其他";
            default:
                return plateColor;
        }
    }

    @Override
    public void setPlateColor(String plateColor) {
        this.plateColor = plateColor;
    }
}
